Weierstrass substitution

From HandWiki
Short description: Change of variable for integrals involving trigonometric functions

In integral calculus, the Weierstrass substitution or tangent half-angle substitution is a change of variables used for evaluating integrals, which converts a rational function of trigonometric functions of [math]\displaystyle{ x }[/math] into an ordinary rational function of [math]\displaystyle{ t }[/math] by setting [math]\displaystyle{ t = \tan \tfrac x2 }[/math].[1][2] This is the one-dimensional stereographic projection of the circle onto the line. The general[3] transformation formula is:

[math]\displaystyle{ \int f(\sin x, \cos x)\, dx =\int f \left(\frac{2t}{1+t^2},\frac{1-t^2}{1+t^2}\right) \frac{2\,dt}{1+t^2}. }[/math]

It is named after Karl Weierstrass (1815–1897),[4][5][6] though it can be found in a book by Leonhard Euler from 1768.[7] Michael Spivak wrote that this method was the "sneakiest substitution" in the world.[8]

The substitution

Introducing a new variable [math]\displaystyle{ t=\tan\tfrac x2, }[/math] sines and cosines can be expressed as rational functions of t, and dx can be expressed as the product of dt and a rational function of t, as follows: [math]\displaystyle{ \sin x = \frac{2t}{1 + t^2}, \qquad \cos x = \frac{1 - t^2}{1 + t^2}, \qquad \text{and} \qquad dx = \frac{2}{1 + t^2}\,dt. }[/math]

Derivation of the formulas

Using the double-angle formulas, introducing denominators equal to one thanks to Pythagorean theorem, and then dividing numerators and denominators by [math]\displaystyle{ \cos^2\tfrac x2, }[/math] one gets

[math]\displaystyle{ \begin{align} \sin x &= \frac {2\sin \tfrac x2\, \cos \tfrac x2}{\cos^2\tfrac x2 + \sin^2 \tfrac x2} = \frac{2\tan \tfrac x2}{1+\tan^2 \tfrac x2} = \frac{2t}{1 + t^2}, \\[18mu] \cos x &= \frac {\cos^2 \tfrac x2 - \sin^2 \tfrac x2}{\cos^2 \tfrac x2 + \sin^2 \tfrac x2} = \frac{1-\tan^2 \tfrac x2}{1 + \tan^2 \tfrac x2} = \frac{1 - t^2}{1 + t^2}.\end{align} }[/math]

Finally, since [math]\displaystyle{ t = \tan \tfrac x2 }[/math], the differentiation rules imply

[math]\displaystyle{ dt = \tfrac12\left(1+\tan^2 \tfrac x2\right) dx = \frac{1+t^2}2 dx, }[/math]

and thus

[math]\displaystyle{ dx=\frac{2}{1 + t^2}dt. }[/math]

Examples

First example: the cosecant integral

[math]\displaystyle{ \begin{align} \int\csc x\,dx&=\int\frac{dx}{\sin x} \\[6pt] &=\int \left(\frac{1 + t^2}{2t}\right) \left(\frac{2}{1 + t^2}\right)dt && t = \tan\tfrac x2 \\[6pt] &=\int\frac{dt}{t} \\[6pt] &=\ln |t |+ C \\[6pt] &=\ln \left|\tan\tfrac x2 \right| + C. \end{align} }[/math]

We can confirm the above result using a standard method of evaluating the cosecant integral by multiplying the numerator and denominator by [math]\displaystyle{ \csc x - \cot x }[/math] and performing the following substitutions to the resulting expression: [math]\displaystyle{ u = \csc x - \cot x }[/math] and [math]\displaystyle{ du = \left(-\csc x \cot x + \csc^2 x\right)\,dx }[/math]. This substitution can be obtained from the difference of the derivatives of cosecant and cotangent, which have cosecant as a common factor. [math]\displaystyle{ \begin{align} \int \csc x \,dx &= \int \frac{\csc x (\csc x - \cot x)}{\csc x - \cot x} \, dx \\[6pt] &= \int \frac{\left(\csc^2 x - \csc x \cot x\right)\,dx}{\csc x - \cot x} && u = \csc x - \cot x \\[6pt] &= \int \frac{du}{u} && du = \left(-\csc x \cot x + \csc^2 x\right) \,dx \\[6pt] &= \ln |u| + C \\[6pt] &= \ln|\csc x - \cot x| + C. \end{align} }[/math]

These two answers are the same because [math]\displaystyle{ \csc x - \cot x = \tan \tfrac x2\colon }[/math]

[math]\displaystyle{ \begin{align} \csc x - \cot x &= \frac{1}{\sin x} - \frac{\sin x}{\cos x} \\[6pt] &= \frac{1+t^2}{2t} - \frac{1-t^2}{1+t^2}\frac{1+t^2}{2t} \qquad\qquad t = \tan \tfrac x2 \\[6pt] &= \frac{2t^2}{2t} = t \\[6pt] &= \tan \tfrac x2 \end{align} }[/math]

The secant integral may be evaluated in a similar manner.

Second example: a definite integral

[math]\displaystyle{ \begin{align} \int_0^{2\pi}\frac{dx}{2+\cos x} &= \int_0^\pi \frac{dx}{2+\cos x} + \int_\pi^{2\pi} \frac{dx}{2+\cos x} \\[6pt] &=\int_0^\infty \frac{2\,dt}{3 + t^2} + \int_{-\infty}^0 \frac{2\,dt}{3 + t^2} & t &= \tan\tfrac x2 \\[6pt] &=\int_{-\infty}^\infty \frac{2\,dt}{3+t^2} \\[6pt] &=\frac{2}{\sqrt 3}\int_{-\infty}^\infty \frac{du}{1+u^2} & t &= u\sqrt 3 \\[6pt] &=\frac{2\pi}{\sqrt 3}. \end{align} }[/math]

In the first line, one does not simply substitute [math]\displaystyle{ t=0 }[/math] for both limits of integration. The singularity (in this case, a vertical asymptote) of [math]\displaystyle{ t=\tan\tfrac x2 }[/math] at [math]\displaystyle{ x=\pi }[/math] must be taken into account. Alternatively, first evaluate the indefinite integral then apply the boundary values. [math]\displaystyle{ \begin{align} \int \frac{dx}{2 + \cos x} &= \int \frac{1}{2 + \frac{1-t^2}{1+t^2}} \frac{2\,dt}{t^2+1} && t = \tan\tfrac x2 \\[6pt] &= \int \frac{2\, dt}{2(t^2+1)+(1-t^2)} = \int \frac{2\,dt}{t^2+3}\\[6pt] &= \frac{2}{3} \int \frac{dt}{\bigl(t \big/ \sqrt 3\bigr)^2 + 1} && u = t \big/ \sqrt 3\\[6pt] &= \frac{2}{\sqrt 3} \int \frac{du}{u^2 + 1} && \tan \theta = u \\[6pt] &= \frac{2}{\sqrt 3} \int \cos^2 \theta \sec^2 \theta \,d\theta = \frac{2}{\sqrt 3} \int d\theta\\[6pt] &= \frac{2}{\sqrt 3} \theta + C = \frac{2}{\sqrt 3} \arctan \left( \frac{t}{\sqrt 3}\right) + C\\[6pt] &= \frac{2}{\sqrt 3} \arctan \left( \frac{\tan\tfrac x2}{\sqrt3}\right) + C. \end{align} }[/math] By symmetry, [math]\displaystyle{ \begin{align} \int_{0}^{2\pi} \frac{dx}{2 + \cos x} &= 2 \int_{0}^{\pi} \frac{dx}{2 + \cos x} = \lim_{b \rightarrow \pi} \frac{4}{\sqrt3} \arctan \left( \frac{\tan\tfrac x2}{\sqrt3}\right) \Biggl|_{0}^{b}\\[6pt] &= \frac{4}{\sqrt3} \Biggl[ \lim_{b \rightarrow \pi} \arctan \left(\frac{\tan\tfrac b2}{\sqrt3}\right) - \arctan (0) \Biggl] = \frac{4}{\sqrt 3} \left( \frac{\pi}{2} - 0\right) = \frac{2\pi}{\sqrt 3}, \end{align} }[/math] which is the same as the previous answer.

Third example: both sine and cosine

[math]\displaystyle{ \begin{align} \int \frac{dx}{a\cos x + b\sin x +c} &= \int \frac{2dt}{a(1-t^2) + 2bt + c(t^2+1)} \\[6pt] &= \int \frac{2dt}{(c-a)t^2 +2bt+a+c} \\[6pt] &= \frac{2}{\sqrt{c^2-(a^2+b^2)}} \arctan \left(\frac{(c-a)\tan\tfrac x2 + b}{\sqrt{c^2-(a^2+b^2)}}\right) + C \end{align} }[/math] if [math]\displaystyle{ c^2-(a^2+b^2)\gt 0. }[/math]

Geometry

The Weierstrass substitution parametrizes the unit circle centered at (0, 0). Instead of +∞ and −∞, we have only one ∞, at both ends of the real line. That is often appropriate when dealing with rational functions and with trigonometric functions. (This is the one-point compactification of the line.)

As x varies, the point (cos x, sin x) winds repeatedly around the unit circle centered at (0, 0). The point

[math]\displaystyle{ \left(\frac{1-t^2}{1+t^2}, \frac{2t}{1+t^2}\right) }[/math]

goes only once around the circle as t goes from −∞ to +∞, and never reaches the point (−1, 0), which is approached as a limit as t approaches ±∞. As t goes from −∞ to −1, the point determined by t goes through the part of the circle in the third quadrant, from (−1, 0) to (0, −1). As t goes from −1 to 0, the point follows the part of the circle in the fourth quadrant from (0, −1) to (1, 0). As t goes from 0 to 1, the point follows the part of the circle in the first quadrant from (1, 0) to (0, 1). Finally, as t goes from 1 to +∞, the point follows the part of the circle in the second quadrant from (0, 1) to (−1, 0).

Here is another geometric point of view. Draw the unit circle, and let P be the point (−1, 0). A line through P (except the vertical line) is determined by its slope. Furthermore, each of the lines (except the vertical line) intersects the unit circle in exactly two points, one of which is P. This determines a function from points on the unit circle to slopes. The trigonometric functions determine a function from angles to points on the unit circle, and by combining these two functions we have a function from angles to slopes.

Gallery


Hyperbolic functions

As with other properties shared between the trigonometric functions and the hyperbolic functions, it is possible to use hyperbolic identities to construct a similar form of the substitution, [math]\displaystyle{ t = \tanh \tfrac x2 }[/math]:

[math]\displaystyle{ \begin{align} &\sinh x = \frac{2t}{1 - t^2}, \qquad \cosh x = \frac{1 + t^2}{1 - t^2}, \qquad \tanh x = \frac{2t}{1 + t^2}, \\[6pt] &\coth x = \frac{1 + t^2}{2t}, \qquad \operatorname{sech} x = \frac{1 - t^2}{1 + t^2}, \qquad \operatorname{csch} x = \frac{1 - t^2}{2t}, \\[6pt] &\text{and} \qquad dx = \frac{2}{1- t^2}\,dt. \end{align} }[/math]

Geometrically, this change of variables is a one-dimensional analog of the Poincaré disk projection.

See also

Further reading

Notes and references

  1. Stewart, James (2012). Calculus: Early Transcendentals (7th ed.). Belmont, CA, USA: Cengage Learning. pp. 493. ISBN 978-0-538-49790-9. https://archive.org/details/singlevariableca00stew_704. 
  2. Weisstein, Eric W. "Weierstrass Substitution." From MathWorld--A Wolfram Web Resource. Accessed April 1, 2020.
  3. Other trigonometric functions can be written in terms of sine and cosine.
  4. Gerald L. Bradley and Karl J. Smith, Calculus, Prentice Hall, 1995, pages 462, 465, 466
  5. Christof Teuscher, Alan Turing: Life and Legacy of a Great Thinker, Springer, 2004, pages 105–6
  6. James Stewart, Calculus: Early Transcendentals, Brooks/Cole, Apr 1, 1991, page 436
  7. Euler, Leonard (1768). "Institutiionum calculi integralis volumen primum. E342, Caput V, paragraph 261". Mathematical Association of America (MAA). http://eulerarchive.maa.org/docs/originals/E342sec1ch5.pdf. 
  8. Michael Spivak, Calculus, Cambridge University Press , 2006, pages 382–383.

External links